package com.heima.admin.controller;

import com.heima.api.wemedia.IWmChannelClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.AdminNewsPageReqDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/api/v1")
@RestController
public class AdminNewsController {
    @Autowired
    private IWmChannelClient wmChannelClient;

    @RequestMapping("/news/list_vo")
    public ResponseResult list_vo(@RequestBody AdminNewsPageReqDto dto) {
        return wmChannelClient.list_vo(dto);
    }
    @GetMapping("/news/one_vo/{id}")
    public ResponseResult one_vo(@PathVariable Integer id) {
        return wmChannelClient.one_vo(id);
    }
    @PostMapping("/news/auth_fail")
    public ResponseResult auth_fail(@RequestBody AdminNewsPageReqDto newsDto){
        return wmChannelClient.auth_fail(newsDto);
    }
    @PostMapping("/news/auth_pass")
    public ResponseResult auth_pass(@RequestBody AdminNewsPageReqDto newsDto){
        return wmChannelClient.auth_pass(newsDto);
    }

}
